package com.zhixiang.xaec.entity.system;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.cfg.Comment;

import com.zhixiang.xaec.entity.BaseEntity;
@Entity
@Table(name="sys_Template")
@Comment("模版")
public class Template extends BaseEntity
{
    
    @Comment("模版编号")
    private String tNo;
    
    @Comment("模版名称")
    private String tName;
    
    @ManyToOne
    @Comment("模板类别")
    @JoinColumn(name="tTypeId")
    private DicDetail tType;
    
    @Comment("是否为默认模版")
    private Integer tDefault;
    
    @Comment("模版属性集合")
    @OneToMany(mappedBy="template",fetch=FetchType.LAZY,
    targetEntity=TemplateAttributes.class)
    List<TemplateAttributes> attributes;

    public String gettNo()
    {
        return tNo;
    }

    public void settNo(String tNo)
    {
        this.tNo = tNo;
    }

    public String gettName()
    {
        return tName;
    }

    public void settName(String tName)
    {
        this.tName = tName;
    }
    
    public Integer gettDefault()
    {
        return tDefault;
    }

    public void settDefault(Integer tDefault)
    {
        this.tDefault = tDefault;
    }

    public DicDetail gettType()
    {
        return tType;
    }

    public void settType(DicDetail tType)
    {
        this.tType = tType;
    }

    public List<TemplateAttributes> getAttributes()
    {
        return attributes;
    }

    public void setAttributes(List<TemplateAttributes> attributes)
    {
        this.attributes = attributes;
    }
    
}
